<html lang="en" xml:lang="en"><head>
<META http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><META name="description" content="RendererChooser class"><meta name="content-language" content="en"><link href="rsrc/htmlhelp.css" rel="stylesheet" type="text/css"><title>Web AppBuilder for ArcGIS | Help - 
RendererChooser class
</title>
                <script type="text/javascript" language="JavaScript">
                    var pathL  = self.location.pathname.split ("/");
                    var fname = pathL[pathL.length-1];
                    var i = fname.lastIndexOf (".htm");
                    if (i>=0) {
                    fname = fname.substring (0, i)
                    } else {
                    //??
                    }
                    if (self.location.hash) {
				    		      fname = fname + self.location.hash;
						        }
                    self.location.replace ("../index.html#//" + fname);
                </script>
                </head><!--Publication GUID: [GUID-E7D1C130-8F87-4109-8D61-E73A46083F52]--><!--Topic GUID: [GUID-57FACD33-CEF5-4E4E-90BE-48CBA73C12A5]--><body><div id="content"><div class="header"><h1>
RendererChooser class
</h1><div id="breadcrumb"></div></div>
<p id="GUID-281ED99F-46AF-41FB-904A-22F4B2767227">The RendererChooser class makes it easy to configure SimpleRenderer, UniqueValueRenderer, and ClassBreaksRenderer. RendererChooser only supports the following symbol types: SimpleMarkerSymbol, PictureMarkerSymbol, SimpleLineSymbol, CartographicLineSymbol, SimpleFillSymbol, and TextSymbol.</p><p id="GUID-6241EB0E-2E7C-4683-8604-B20CE3B60C2C"><b>AMD Module Require:</b></p>

<div class="codeblock" purpose="codeblock"><div class="highlight"><pre><code><span class="nx">require</span><span class="p">([</span><span class="s2">&quot;jimu/dijit/RendererChooser&quot;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">RendererChooser</span><span class="p">)</span> <span class="p">{</span> <span class="cm">/* code goes here */</span> <span class="p">});</span>
</code></pre></div>
</div><p id="GUID-05AF9063-2E32-496A-92EE-B99F29822257"><b>Constructor:</b></p><div class="block_table" id="TABLE_FB3E3B7A87094BBB9C30997D7B6225B4" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-E6B42A3F-BC35-4C1D-8B7E-94B7146A53F6"><span class="usertext">new RendererChooser(params, srcNodeRef)</span></p><p id="GUID-80AB0E1E-069B-4020-B35D-5EC17FA09B4A"> Create a new RendererChooser dijit.</p><p id="GUID-41C37D00-115D-4C71-BBA4-675CD5937D3A"><b>Parameters:</b></p><p id="GUID-A3655112-E002-4DF1-9BB6-D94D414FBE61"> &lt;Object&gt; params:  Required.  Parameters for the RendererChooser dijit. </p><p id="GUID-B6186958-E07D-4E07-AF0C-B5CA43CAEF9A"> &lt;DOMNode | String&gt; srcNodeRef: Optional.  HTML element where the RendererChooser dijit is rendered.</p><p id="GUID-367FCB91-B4DE-42B3-9873-EEAF29123C63"><b> params properties:</b></p><p id="GUID-2E057496-81C4-4E5A-AF90-BC1768133E0C"> &lt;String&gt; type:  Optional.   This property indicates which renderer the dijits shows. The available type values are marker, line, and fill. If the type is marker, it will show a renderer with marker symbols. If the type is line, it will show a renderer with line symbols. If the type is fill, it will show a renderer with fill symbols. <div class="notes" id="GUID-46EF6315-326F-4DDD-86E3-81BBCFDF6926"><div class="note"><img class="note_img" src="rsrc/note.png" alt="Note" title="Note"><span>Note:</span></div><div class="tipbody"><p id="GUID-87D15AA9-4FBC-481A-BB30-2409895A82A1">Either the type property or the renderer property is required.</p></div></div></p><p id="GUID-BB690FCA-D18D-46BC-9A71-DB56B27520E6">  &lt;Renderer&gt; renderer: Optional.   The renderer to show. <div class="notes" id="GUID-AE447A71-A42F-4B75-BD46-B8901C20E414"><div class="note"><img class="note_img" src="rsrc/note.png" alt="Note" title="Note"><span>Note:</span></div><div class="tipbody"><p id="GUID-9597AC37-9D87-4111-9FF1-CF1F3716BAA7">The renderer property only supports the following types: SimpleRenderer, UniqueValueRenderer, and ClassBreaksRenderer. Either the type property or the renderer property is required.</p></div></div></p>
<p id="GUID-287D3F02-1B12-4887-B1E2-35A13B560C3B"> &lt;String&gt;[] fields:  Required.  The field names used to configure UniqueValueRenderer and ClassBreaksRenderer.</p><p id="GUID-F441F775-B742-41EB-9FCA-968B1CD124B9">Example:</p><div class="codeblock" purpose="codeblock"><div class="highlight"><pre><code><span class="nx">require</span><span class="p">([</span><span class="s1">&#39;jimu/dijit/RendererChooser&#39;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">RendererChooser</span><span class="p">){</span>
					<span class="kd">var</span> <span class="nx">rendererChooser</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">RendererChooser</span><span class="p">({</span>
						<span class="nx">type</span><span class="o">:</span><span class="s2">&quot;marker&quot;</span><span class="p">,</span>
				  		<span class="nx">fields</span><span class="o">:</span><span class="p">[</span><span class="s2">&quot;field1&quot;</span><span class="p">,</span><span class="s2">&quot;field2&quot;</span><span class="p">]</span>
					<span class="p">},</span> <span class="nx">srcNodeRef</span><span class="p">);</span>
					<span class="p">...</span>
				<span class="p">});</span>

<span class="nx">require</span><span class="p">([</span><span class="s1">&#39;jimu/dijit/RendererChooser&#39;</span><span class="p">,</span><span class="s1">&#39;esri/renderers/SimpleRenderer&#39;</span><span class="p">],</span> <span class="kd">function</span><span class="p">(</span><span class="nx">RendererChooser</span><span class="p">,</span><span class="nx">SimpleRenderer</span><span class="p">){</span>
					<span class="kd">var</span> <span class="nx">renderer</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">SimpleRenderer</span><span class="p">(...);</span>
					<span class="kd">var</span> <span class="nx">rendererChooser</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">RendererChooser</span><span class="p">({</span>
						<span class="nx">renderer</span><span class="o">:</span><span class="nx">renderer</span><span class="p">,</span>
				  		<span class="nx">fields</span><span class="o">:</span><span class="p">[</span><span class="s2">&quot;field1&quot;</span><span class="p">,</span><span class="s2">&quot;field2&quot;</span><span class="p">]</span>
					<span class="p">},</span> <span class="nx">srcNodeRef</span><span class="p">);</span>
					<span class="p">...</span>
				<span class="p">});</span>
</code></pre></div>
</div></td></tr></tbody></table><span class="table_desc"></span></div><p id="GUID-E3293A94-6D04-495A-9BD8-41D79E63E6D3"><b>Methods:</b></p><div class="block_table" id="TABLE_24FF40BE05DE40F6A5C535C77134EE88" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-C4A2AD24-0416-4C40-B781-A877AA66D551"><span class="usertext"> showByType(type)</span></p><p id="GUID-37B332A5-6855-40BB-A798-B7472E46AD65"> Determines which  renderer shows.</p><p id="GUID-1E418796-26BE-4B81-A86B-8DF16CB23884"><b>Parameters:</b></p><p id="GUID-04CF9476-53AB-4834-9507-9A109C11D83B"> &lt;String&gt; type:   Required.   The available type values are marker, line, and fill. If the type is marker, it will show a renderer with marker symbols. If the type is line, it will show a renderer with line symbols. If the type is fill, it will show a renderer with fill symbols.</p>
</td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_E6B1095AB6AF4CF5B467E9C33F883EAE" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-9BB86DDB-3AC9-4BB5-81CC-9924672F167D"><span class="usertext">  showByRenderer(renderer)</span></p><p id="GUID-FAA7C09D-0E4C-46BF-9D4C-3DCAA616E168">  Shows the specified renderer.</p><p id="GUID-76C34FA3-FD8F-477B-8879-D3BF9A29C522"><b>Parameters:</b></p><p id="GUID-494D5FD5-DE95-4D2C-8F8D-57FC50716705">   &lt;Renderer&gt; renderer:   Required. The renderer to show. renderer only supports the following types: SimpleRenderer, UniqueValueRenderer, and ClassBreaksRenderer.</p>



</td></tr></tbody></table><span class="table_desc"></span></div><div class="block_table" id="TABLE_2B841D99ED7A455BB0A10A9038E30FFB" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="1.12*"></colgroup><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-3F9057A5-D69B-4745-ACB2-E59A212F8225"><span class="usertext">  getRenderer()</span></p><p id="GUID-8CFE8133-C4A1-476F-A22A-E858DD318F69">   Gets the renderer configured by RendererChooser.</p>
<p id="GUID-00FD7C20-406F-4E14-996E-17D4A28F1B2E"> Return type: Renderer.</p></td></tr></tbody></table><span class="table_desc"></span></div>

<div class="footer"> Copyright © 1995-2016 Esri. All rights reserved. </div></div></body></html>